//
// Shared Stack
// Created by Win10 on 2022/10/31.
//

#ifndef C_DATA_STRUCTURE_SQ_STACK_H
#define C_DATA_STRUCTURE_SQ_STACK_H

#define MaxSize 50

typedef int ElemType;

typedef struct {
    ElemType data[MaxSize];
    int top;
} SqStack;

void InitStack(SqStack &S);

bool StackEmpty(SqStack S);

bool Push(SqStack &S, ElemType x);

bool Pop(SqStack &S, ElemType &x);

bool GetTop(SqStack S, ElemType &x);

bool DestoryStack(SqStack &S);


#endif //C_DATA_STRUCTURE_SQ_STACK_H
